package oop.ex3.usercommands;

import java.io.DataInputStream;
import java.io.DataOutputStream;

import oop.ex3.filemanager.FileManager;

public abstract class UserMessage {
	protected FileManager _fileManager;
	//TODO check if needed:
	//protected DataInputStream _targetInput;
	//protected DataOutputStream _targetOutput;
	
	protected static final boolean FAILURE=false, SUCCESS=true;
	
	/**
	 * Default constructor for a UserMessage.
	 * Sets the fileManager given as a parameter as this
	 * UserMessage's fileManager.
	 * @param fileManager the fileManager using this UserMessage.
	 */
	public UserMessage(FileManager fileManager){
		this._fileManager = fileManager;
	}

	/**
	 * Handles the run of this User Message.
	 * @return FAILURE in case the message run failed, SUCCESS otherwise.
	 */
	public abstract boolean run();
}
